package com.example.springcloud.account.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.springcloud.account.entity.Account;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;

@Mapper
public interface AccountMapper extends BaseMapper<Account> {

    int deduct(@Param("userId") Long userId, @Param("money") BigDecimal money);

    int freeze(@Param("userId") Long userId, @Param("money") BigDecimal money);

    int confirmDeduct(@Param("userId") Long userId, @Param("money") BigDecimal money);

    int cancelDeduct(@Param("userId") Long userId, @Param("money") BigDecimal money);
}

